<?php
function smarty_block_shadowbox($params, $content, &$smarty, $open) {
    if (!$open) {
        $width = 150;
        $height = 70;
        $title = "";
        foreach ($params as $key=>$value) {
            if ($key == "width") {
                $width = $value;
            } else if ($key == "height") {
                $height = $value;
            } else if ($key == "title") {
                $title = $value;
            }
        }
        $height2 = $height - 20; 
        $smarty->assign("width", $width);
        $smarty->assign("height", $height);
        $smarty->assign("height2", $height2);
        $smarty->assign("title", $title);

        $smarty->assign("content", $content);

        return $smarty->fetch("site/plugins/shadowbox.tpl");
    }
}

?>
